package com.example.api.client;

import com.common.domain.R;
import com.example.api.domain.entity.CollectDetails;
import com.example.api.domain.entity.Subscribe;
import com.example.api.domain.entity.User;
import com.example.api.client.fallback.UserClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

@FeignClient(value = "user-model",fallbackFactory = UserClientFallBack.class)
public interface UserClient {
    @PostMapping("/user/login")
     R login(@RequestBody User user);
    @GetMapping("/user/getById")
    R getById(Long userId);
    @GetMapping("/user/list")
    R<List<User>> list(@RequestParam("ids") Set<Long> ids);
    @GetMapping("/user/subscribe")
    R<List<Subscribe>> getUserSubscribe(@RequestParam("id") Long id);
    @GetMapping("/user/attention")
    R<List<Long>> getAttention(@RequestParam("id") Long id);
    @PostMapping("/collect/user")
    R collectVideo(@RequestParam Long collectId,@RequestParam Long videoId);
}
